package com.shisfish.library.Impl;

import java.util.List;

import org.springframework.context.ApplicationContext;

import com.shisfish.library.Inter.IBarcodeInter;
import com.shisfish.library.Model.Barcode;
import com.shisfish.library.Utils.Global.GetACXmlUtils;

public class BarcodeImpl implements IBarcodeInter {

	private ApplicationContext ac = GetACXmlUtils.getACXml();
	private IBarcodeInter mapper = (IBarcodeInter) ac.getBean("barcodeMapper");
	
	@Override
	public int insertOne(Barcode t) {
		// TODO Auto-generated method stub
		return mapper.insertOne(t);
	}

	@Override
	public int insertAll(List<Barcode> list) {
		// TODO Auto-generated method stub
		return mapper.insertAll(list);
	}

	@Override
	public int updateOne(Barcode t) {
		// TODO Auto-generated method stub
		return mapper.updateOne(t);
	}

	@Override
	public int updateAll(List<Barcode> list) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<Barcode> selectById(int id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Barcode> selectByKey(String key) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int countAll() {
		// TODO Auto-generated method stub
		return mapper.countAll();
	}

	@Override
	public List<Barcode> selectAll() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int deleteOneById(int id) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteAllById(List<?> ids) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteOneByKey(String key) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteAllByKey(List<?> keys) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int countNot() {
		// TODO Auto-generated method stub
		return mapper.countNot();
	}

	@Override
	public List<Barcode> selectNotPage(int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectNotPage(currentPage, pageSize);
	}

	@Override
	public void used(String code) {
		// TODO Auto-generated method stub
		mapper.used(code);
	}

	@Override
	public Barcode selectByCode(String code) {
		// TODO Auto-generated method stub
		return mapper.selectByCode(code);
	}

	public int countType(int type) {
		// TODO Auto-generated method stub
		return mapper.countType(type);
	}

	public List<Barcode> selectTypePage(int type, int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectTypePage(type, currentPage, pageSize);
	}

}
